<template>
  <div v-for="(item, index) in route" :key="item.path">
    <el-menu-item v-if="(!item.children || item.children)" :index="item.path">
      <el-icon>
        <location />
      </el-icon>
      <template #title>{{ item.name }}</template>
    </el-menu-item>
    <el-sub-menu v-else :index="item.path">
      <template #title>
        <el-icon>
          <location />
        </el-icon>
        <span>{{ item.name }}</span>
      </template>
      <Men :route="item.children"></Men>
    </el-sub-menu>


  </div>
</template>

<script setup lang="ts">
const { route } = defineProps(['route'])
console.log(6666666666, route);

</script>

<style scoped></style>